package bookstore.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;
import java.util.Vector;

@Document
public class BookReview {
    @Id
    private String isbn;

    private List<BookReviewItem> review;

    public BookReview(String isbn) {
        this.isbn = isbn;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public List<BookReviewItem> getReview() {
        if (review == null) {
            review = new Vector<>();
        }
        return review;
    }
}
